﻿<Abstract:LocationControl x:Class="CustomControls.HotelaccommodationControl.AccommPhoto"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:Converters="clr-namespace:Helpers.Converters;assembly=Helpers"
                xmlns:Abstract="clr-namespace:CustomControls.Abstract" mc:Ignorable="d" x:Name="Parent"
             Width="250" Height="250" Background="Transparent">
    <Abstract:LocationControl.Resources>
		<Converters:SubtractValueConverter x:Key="SubtractValueConverter" />
        </Abstract:LocationControl.Resources>
	<Border BorderThickness="3" Width="{Binding ElementName=Parent,Path=Width}" Height="{Binding ElementName=Parent,Path=Height}" CornerRadius="{Binding ElementName=Parent,Path=Width}" BorderBrush="#FFC19914">
        <Grid Width="{Binding ElementName=Parent,Path=Width, Converter={StaticResource SubtractValueConverter}, ConverterParameter=6}" Height="{Binding ElementName=Parent,Path=Height, Converter={StaticResource SubtractValueConverter}, ConverterParameter=6}" HorizontalAlignment="Center" VerticalAlignment="Center" >
            <Border Background="White" CornerRadius="{Binding ElementName=Parent,Path=Width, Converter={StaticResource SubtractValueConverter}, ConverterParameter=6}" Name="mask" Width="{Binding ElementName=Parent,Path=Width, Converter={StaticResource SubtractValueConverter}, ConverterParameter=6}" Height="{Binding ElementName=Parent,Path=Height, Converter={StaticResource SubtractValueConverter}, ConverterParameter=6}" />
            <Image Name="imgAccomm" Stretch="Fill" Width="{Binding ElementName=Parent,Path=Width, Converter={StaticResource SubtractValueConverter}, ConverterParameter=6}" Height="{Binding ElementName=Parent,Path=Height, Converter={StaticResource SubtractValueConverter}, ConverterParameter=6}" >
                    <Image.OpacityMask>
                        <VisualBrush Visual="{Binding ElementName=mask}"/>
                    </Image.OpacityMask>
                </Image>            
        </Grid>
    </Border>
</Abstract:LocationControl>
